﻿
<InfoCard Href="@("/peripheries/index/" + Model.Id)" BriefIntroduction="@Model.BriefIntroduction" Image="@Model.MainImage" InfoItems="GetInfoItems()" Name="@Model.Name" Type="@Model.Type.GetDisplayName()"
          BigCardStyle="BigCardStyle" AddInfors="Model.AddInfors" ShowAddInfors="ShowAddInfors" IsEdit="IsEdit" />

@code {
    [Parameter]
    public PeripheryInforTipViewModel Model { get; set; }
    [Parameter]
    public bool IsEdit { get; set; }
    /// <summary>
    /// 强制大卡片样式
    /// </summary>
    [Parameter]
    public bool BigCardStyle { get; set; }
    [Parameter]
    public bool ShowAddInfors { get; set; } = true;

    public List<(IconType, string)> GetInfoItems()
    {
        var items = new List<(IconType, string)>
        {
            (IconType.DeterminedTime,Model.LastEditTime.ToString("yyyy-MM-dd")),
            (IconType.Comment,Model.CommentCount.ToString()+"条评论"),
            (IconType.Read,Model.ReaderCount.ToString()+"次阅读"),
        };
        return items;
    }
}
